{assign var=iCurrentColumn value=1}
{assign var=iColumnHeight value=$iCount/3}
<table style="width: 100%;" cellpadding="4" cellspacing="0">
    <tr>
        <td class="border2">
            <table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
                <tr>
                <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
                <td class="block_header">{language text="genres"}</td>
                </tr>
            </table>
            <table style="width:100%;" cellspacing="1" cellpadding="1">
                <tr>
                    <td width="10"></td>
                    <td>
                        <div style="padding:8px;">
                            <table style="width: 100%;">
                                <tr>
                                    <td style="valign:top;">
{foreach from=$aGenres item=aGenre name=agenres key=iKey}
    {if (($smarty.foreach.agenres.iteration-1) % round($iColumnHeight))}
                                        <div class="list"><a class="link_item" href="{url link='public.music.stylemusic' genre=$aGenre.genre_id}">{language translate=$aGenre.genre_name}</a></div>
    {else}
        {assign var=iCurrentColumn value=$iCurrentColumn+1}
                                    </td>
                                    <td valign="top">
                                        <div class="list"><a class="link_item" href="{url link='public.music.stylemusic' genre=$aGenre.genre_id}">{language translate=$aGenre.genre_name}</a></div>
    {/if}
{/foreach}
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>